package com.qdxwx.models.company;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author ZhiYong
 * @dateTime 2020/6/1 13:57
 * @description 多机构账户
 */
public class CompanyAccount implements Serializable {

    private static final long serialVersionUID = -6088240291317717154L;
    //机构Id
    private int companyId;
    //冻结金额（单位分）
    private Integer frozenAmount;
    //账户余额（单位分）
    private Integer amount;
    //乐观锁
    private int version;
    //是否禁用
    private Integer isDisabled;
    //最后更新时间
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    public Integer getFrozenAmount() {
        return frozenAmount;
    }

    public void setFrozenAmount(Integer frozenAmount) {
        this.frozenAmount = frozenAmount;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public Integer getIsDisabled() {
        return isDisabled;
    }

    public void setIsDisabled(Integer isDisabled) {
        this.isDisabled = isDisabled;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "CompanyAccount{" +
                "companyId=" + companyId +
                ", frozenAmount=" + frozenAmount +
                ", amounts=" + amount +
                ", version=" + version +
                ", isDisabled=" + isDisabled +
                ", updateTime=" + updateTime +
                '}';
    }
}
